<template>
  <div class="personal">
    <header-top>
      <a class="header_left" slot="left" @click="$router.back()">
        <img src="../../assets/images/icon_fanhui.png"/>
      </a>
      <a class="header_center" slot="center">
        <span>个人信息</span>
      </a>
    </header-top>
    <div class="discovery_content">
      <div class="discovery_content_center">
        <flexbox>
          <flexbox-item :span="6">
            <div class="discovery_content_header_item">头像</div>
          </flexbox-item>
          <flexbox-item :span="3">
            <div class="discovery_content_header_img">
              <img src="../../assets/images/icon_tuoxiang.png" style="width: 50px;height: 50px;"/>
            </div>
          </flexbox-item>
          <flexbox-item :span="1">
            <div class="discovery_content_header_div">
              <img src="../../assets/images/btn_jiantou.png" style="width: 9px;height: 15px;"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"></p>
        <flexbox>
          <flexbox-item :span="8">
            <div class="discovery_content_center_item">昵称</div>
          </flexbox-item>
          <flexbox-item :span="4">
            <div class="discovery_content_center_div">
              <span class="discovery_content_center_span">涂曲线</span>
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"></p>
        <flexbox>
          <flexbox-item :span="8">
            <div class="discovery_content_center_item">性别</div>
          </flexbox-item>
          <flexbox-item :span="4">
            <div class="discovery_content_center_div">
              <span class="discovery_content_center_span">男</span>
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
      </div>
      <div class="discovery_content_footer">
        <flexbox>
          <flexbox-item :span="8">
            <div class="discovery_content_center_item">手机号</div>
          </flexbox-item>
          <flexbox-item :span="4">
            <div class="discovery_content_center_div">
              <span class="discovery_content_center_span_iphone">13232331319</span>
            </div>
          </flexbox-item>
        </flexbox>
        <p class="line"></p>
        <flexbox @click.native="$router.push('/password/change')">
          <flexbox-item :span="8">
            <div class="discovery_content_center_item">修改密码</div>
          </flexbox-item>
          <flexbox-item :span="4">
            <div class="discovery_content_center_div">
              <img src="../../assets/images/btn_jiantou.png"/>
            </div>
          </flexbox-item>
        </flexbox>
      </div>
    </div>
    <div class="discovery_footer" :style="{marginTop:fullHeight+'px'}">
      <x-button type="primary" @click.native="$router.push('/login')">注销</x-button>
    </div>
  </div>
</template>

<script>
  import {Flexbox, FlexboxItem, XButton} from 'vux'
  import HeaderTop from '../../components/HeaderTop/HeaderTop'

  export default {
    name: "Personal",
    components: {
      Flexbox,
      FlexboxItem,
      XButton,
      HeaderTop
    },
    data() {
      return {
        fullHeight: document.documentElement.clientHeight - 400
      }
    }
  }
</script>

<style scoped>
  .personal {
    overflow-y: hidden;
  }

  .discovery_content {
    margin-top: 48px;
  }

  .discovery_content_center {
    margin: 10px;
    margin-top: 58px;
    background-color: #fff;
    border: 1px solid #ffdccd;
    border-radius: 3px;
  }

  .discovery_content_header_item {
    color: #333;
    font-size: 14px;
    height: 72px;
    line-height: 72px;
    margin-left: 20px;
  }

  .discovery_content_header_img {
    position: absolute;
    right: 60px;
    top: 72px;
  }

  .discovery_content_header_div img {
    width: 9px;
    height: 15px;
    position: absolute;
    right: 30px;
  }

  .discovery_content_center_item {
    color: #333;
    font-size: 14px;
    height: 48px;
    line-height: 48px;
    margin-left: 20px;
  }

  .discovery_content_center_div {
    text-align: center;
  }

  .discovery_content_center_div img {
    width: 9px;
    height: 15px;
    position: absolute;
    right: 30px;
    margin-top: -8px;
  }

  .discovery_content_center_span {
    color: #a0a0a0;
    font-size: 14px;
    position: absolute;
    right: 60px;
    margin-top: -8px;
  }

  .discovery_content_center_span_iphone {
    color: #a0a0a0;
    font-size: 14px;
    right: 30px;
  }

  .discovery_content_footer {
    margin: 10px;
    background-color: #fff;
    border: 1px solid #ffdccd;
    border-radius: 3px;
  }

  .discovery_footer {
    width: 90%;
    margin: 0 auto;
  }

</style>
